// UEVariable.cpp: implementation of the CUEVariable class.
//
//////////////////////////////////////////////////////////////////////

#include "..\stdafx.h"
#include "..\PDARX.h"
#include "UEVariable.h"
#include "modregistry.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
    CString CUEVariable::m_strWinDir = _T("");
	CString CUEVariable::m_strPrjDBDir = _T("");
	CString CUEVariable::m_strWorkDBDir = _T("");
//	CString CUEVariable::m_strSortDir = _T("");
//	CString CUEVariable::m_strStandDir = _T("");
    CString CUEVariable::g_strFileName = _T("");
    CString CUEVariable::g_strFileExt = _T("");
    CString CUEVariable::g_strFileTitle = _T("");
    CString CUEVariable::g_strFilePath = _T("");
	CString g_strTowerFilePath = _T("");


CUEVariable::CUEVariable()
{
	

}

CUEVariable::~CUEVariable()
{

}

BOOL CUEVariable::GetItemRegVal()
{
	g_strTowerFilePath = GetRegKey(_T("Directory"), _T("TowerFilePath"),(CString)_T("C:\\"));
	m_strPrjDBDir = GetRegKey(_T("Directory"), _T("EDInBox_prjDBDir"), (CString)_T("c:\\TowerDB"));
	m_strWorkDBDir = GetRegKey(_T("Directory"),_T("EDInBox_WorkDBDir"),(CString)_T("C:\\TowerWorkDB"));
	//m_strPrjDBDir = GetRegKey(_T("Directory"), "SortDir", (CString)"c:\\TowerSortDB");
	//m_strPrjDBDir = GetRegKey("Directory", "StandDir", (CString)"c:\TowerStandDB");

//update by ywh	
//	m_lSelVlmID = GetRegKey("Directory", "EDInBox_VolumeID", (long)0);
//	m_lSelTowerID = GetRegKey("Directory", "EDInBox_TowerID", (long)0);

	return TRUE;
}

BOOL CUEVariable::SetItemRegVal()
{
	SetRegValue(_T("Directory"), _T("TowerFilePath"),(CString)g_strTowerFilePath);
	SetRegValue(_T("Directory"), _T("EDInBox_prjDBDir"), (CString)m_strPrjDBDir);
	SetRegValue(_T("Directory"), _T("EDInBox_WorkDBDir"), (CString)m_strWorkDBDir);
//	SetRegValue("Directory", "SortDir", (CString)m_strSortDir);
//	SetRegValue("Directory", "StandDir", (CString)m_strStandDir);

/// update by ywh	
//	SetRegValue("Directory", "EDInBox_VolumeID", (long)m_lSelVlmID);
//	SetRegValue("Directory", "EDInBox_TowerID", (long)m_lSelTowerID);
	return TRUE;
}
